/*!
 * \file es_core.h
 *
 * \brief es 解析模块
 *
 * All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.\n
 * ct管理用共通函数
 *
 * \version 4.0
 * \author geyh
 * \date 2016/08/29
 *
 */

#ifndef __ES_CORE_H_
#define __ES_CORE_H_

#include "frbyte_buffer.h"

#define ES_FLAG_COMPRESS            0x04
#define ES_FLAG_ERR                 0x02
#define ES_FLAG_RES                 0x01

typedef struct __es_private
{
    unsigned int ui_data_len;
    uint64_t u64_request_id;

    Frlist_header *p_lst_comm;
    Frlist_header *p_lst_req;

    unsigned long ul_seq;                             /* 序列号，1次req和response时，使用同一个序列号 */
    L4_transaction st_l4_trans;                       /* 时间信息 */

    Frbyte_Packet *p_st_data;


}es_private;

int es_session_destroy(void *p_private_session);
int es_analysis(Conntrack *p_st_conn, Apm_packet *p_st_packet, Frhash_header *p_st_hash_report);
int es_detect(Conntrack *p_st_conn, Apm_packet *p_st_packet);

#endif // __ES_CORE_H_
